﻿/*==========================================================
	TASK 7:                            {Console InputOutput}
	Write a program that gets a number n and after that 
    gets more n numbers and calculates and prints their sum.    
==========================================================*/

using System;

class NandMoreNnumbersPrintSum
{
    static void Main()
    {
        Console.Write("Enter n=");
        int n = int.Parse(Console.ReadLine());

        int sum = 0;
        int a;
        for (int i = 1; i <= n; i++)
        {
            Console.Write("n{0}=", i);
            a = int.Parse(Console.ReadLine());
            sum = sum + a;
        }
        Console.WriteLine("Sum of numbers is:{0}", sum);
    }
}

